<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layout/t.xhtml">

	<ui:define name="title">
		<h:outputText value="Gestione Menu (passo 2)" />
	</ui:define>
	<ui:define name="roles">
		<f:attribute name="roles" value="menu" />
	</ui:define>
	<ui:define name="content">
		<h:form>
			<center>
				<p:panel
					header="Gestione Menu: #{menuController.element.name} (passo 2)">
					<h:outputLabel value="Sorgente voci menu" for="display"
						style="font-weight: bolder;" />
					<br />
					<p:outputPanel id="display">
						<h:panelGrid columns="2">

							<h:outputLabel for="name" value="Sorgente voci:" />
							<h:outputLabel for="description" value="Descrizione:"
								rendered="false" />
							<h:outputLabel for="path" value="Percorso:" />

							<h:selectOneMenu id="name"
								value="#{menuController.element.dynamicItem.name}">
								<f:selectItems value="#{menuSourceItems}"/>
							</h:selectOneMenu>
							<h:inputText id="description"
								value="#{menuController.element.dynamicItem.description}"
								rendered="false" />
							<h:selectOneMenu id="path" 
								value="#{menuController.element.dynamicItem.page.id}">
								<f:selectItems value="#{pageItems}"/>
							</h:selectOneMenu>

						</h:panelGrid>
					</p:outputPanel>
					<br />

				</p:panel>
				<br /> <br />

				<h:panelGrid columns="3">
					<h:commandButton action="#{menuController.step3d}"
						value="Prosegui (dettagli collegamento)" />

					<h:commandButton id="reset" action="#{menuController.reset}"
						value="Annulla" immediate="true" />
				</h:panelGrid>
			</center>

		</h:form>
	</ui:define>
</ui:composition>